const { body } = require("express-validator");
module.exports = {
  //用户注册
  createUserValidate: [
    body("username").isEmail().withMessage("Please enter a valid email"),
    body("password")
      .isLength({ min: 5 })
      .withMessage("Password must be at least 5 characters long"),
    body("phoneNumber")
      .isMobilePhone()
      .withMessage("Please enter a valid phone number"),
  ],
  //用户登录
  userLogin: [
    body("username").isEmail().withMessage("Please enter a valid email"),
    body("password")
      .isLength({ min: 5 })
      .withMessage("Password must be at least 5 characters long"),
  ],
};
